<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');

$count = count($this->items);
$_row = ceil($count/$this->state->get('page.columns'));
$_column = $this->state->get('page.columns');
$per = floor(100/$_column);
?>
<link rel="stylesheet" href="<?php echo JURI::root().'components/com_shop/assets/'; ?>style.css" type="text/css" />
<?php if($this->state->get('page.show_page_heading')):?>
<div class="item_page_title">
<h2><?php echo $this->state->get('page.page_title'); ?></h2>
</div>
<?php endif;?>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="shop-home-table">
<tbody>
	<?php for($i = 0 ; $i < $_row ; $i++):?>
    <tr>
    	<?php for($j = 0 ; $j < $_column; $j++):?>
        	<?php if(isset($this->items[$i*$_column+$j])):
			$item = $this->items[$i*$_column+$j];
$link = JRoute::_('index.php?option=com_shop&view=detail&id='.$item->id.':'.$item->alias);
			?>
            <td width="<?php echo $per; ?>%" valign="top">
            <div class="shop-home-item-p">
            	<a href="<?php echo $link; ?>" title="<?php echo $item->vtitle; ?>::<?php echo $item->etitle; ?><br />
                Địa chỉ: <?php echo $item->address; ?><br />
                Điện thoại: <?php echo $item->phone; ?><br />
                Fax: <?php echo $item->fax; ?><br />
                Email: <?php echo $item->email; ?><br />
                Lĩnh vực hoạt động: <?php echo $item->fulltext; ?>" class="hasTip"><img src="<?php echo $this->path_img.'thumb/'.$item->logo_img; ?>" alt="<?php echo $item->alias; ?>" width="<?php echo $this->state->get('product.widthimg'); ?>" height="<?php echo $this->state->get('product.heightimg'); ?>" class="shop-home-pape-img" /></a>
            </div>
            <?php endif;?>
        <?php endfor;?>
    </tr>
    <?php endfor;?>
</tbody>
<tfoot>
<tr>
	<td colspan="<?php echo $_column; ?>"><?php echo $this->pagination->getPagesLinks(); ?></td>
</tr>
</tfoot>
</table>
<style>
div.tip-wrap{ background:#f9f8bf; border-radius:5px;}
div.tip-title{ font-weight: bold;
	background: #20bbf1 !important;
	padding: 2px !important;}
div.tip-text{ padding-left: 2px !important;}
div.tip{ border: solid 1px aquamarine !important;
	padding: 0 !important;}
</style>